<!--Nội dung cột bên phải -->
<style>
    .searchRow {
        float: left;
    }
    .searchBook {
        float: left;
        /*width: 150px;*/
        padding-top: 5px;
    }
    .searchBook span {
        font-size: 15px;
        font-weight: bold;
    }
    .selectboxStyle {
        border: 1px solid rgb(220, 220, 220);
        padding: 4px;
        margin-left: 6px;
        width: 120px;
        float: left;
    }
    .valueSearch {
        border: 1px solid rgb(220, 220, 220);
        padding: 4px;
        margin-right: 6px;
        margin-left: 6px;
        width: 250px;
    }
    .fl {
        float:left;
        display: block;
    }
</style>
<div class="contentRight-2">
    <div class="boxShadowRight-3">
        <div class="boxRightTop-3">
        </div>
        <div class="boxRighMiddle-3" style="min-height: 610px;">
            <div class="lineTitleRight-1">
                <div class="book_bg">              
                    <span>
                        Tìm kiếm tài liệu
                    </span>
                </div>
                <div id="MainContent_ctl07_divContent" class="" style="margin-left: 80px;">
                    <?php
                    $form = $this->form;
                    $form->setAttribute('action', $this->url('search-book/process', array('action' => 'index')));
                    echo $this->form()->openTag($form);
                    ?>
                    <div class="searchRow">
                        <div class="searchBook" style="text-align: left">
                            <span id="MainContent_ctl07_Label1">Nội dung tìm:</span>&nbsp;
                        </div>
                        <div class="fl">
                            <?php
                            echo $this->formRow($form->get('keySearch'));
                            echo $this->formRow($form->get('valueSearch'));
                            echo $this->formRow($form->get('search'));
                            ?>
                        </div>
                    </div>
                    <?php echo $this->form()->closeTag($form); ?>
                </div>
            </div>
            <div style="margin: 80px 8px 8px 8px;display: block;">
            </div>
            <?php if (isset($paginator) && $paginator != null): ?>
                <div class="lineGrayRight">
                    <h2 class="titleBlack-large">
                        Dữ liệu biên mục</h2>
                </div>
                <div id="ContentPlaceHolder1_Detail1_divSimple">
                    <?php foreach ($paginator as $book): ?>
                        <table cellpadding="0" cellspacing="0" class="tblDetailDocument">
                            <tr>
                                <td class="tdLeft row1_bg">
                                    Dạng tài liệu:
                                </td>
                                <td class="tdRight row1_bg">
                                    <span id="ContentPlaceHolder1_Detail1_lbDocumentFormat"><?php echo $book->bookTypeName; ?></span>
                                </td>
                            </tr>
                            <hr>
                            <tr>
                                <td class="tdLeft row1_bg">
                                    Phân loại:
                                </td>
                                <td class="tdRight row1_bg">
                                    <span id="ContentPlaceHolder1_Detail1_lbDocumentFormat"><?php echo $book->bookCategoryName; ?></span>
                                </td>
                            </tr>
                            <tr>
                                <td class="tdLeft">
                                    Thông tin mô tả:
                                </td>
                                <td class="tdRight">
                                    <h4>
                                        <span>
                                            <?php echo $book->title; ?>
                                        </span>
                                    </h4>
                                    <p>
                                        <span>
                                            <?php echo $this->escapeHtml('/ Tác giả: ' . $allAuthor[$book->bookBarcode] . ' / Số trang: ' . $book->numberOfPages . ' / ' . $book->publisher . ' / ' . $book->paperSize . ' / Giá: ' . $book->price) ?>
                                        </span>
                                    </p>
                                </td>
                            </tr>
                            <tr id="trSummary">
                                <td class="tdLeft row1_bg">
                                    Tóm tắt:
                                </td>
                                <td class="tdRight row1_bg">
                                    <p>
                                        <span id="ContentPlaceHolder1_Detail1_lblSummary">
                                            <?php echo $book->bookDescription; ?>
                                        </span>
                                    </p>
                                </td>
                            </tr>
                        </table>
                    <?php endforeach; ?>
                    <!--So sach hien co-->
                </div>
                <div class="lineGrayRight">
                    <h2 class="titleBlack-large">
                        Tài liệu hiện có
                    </h2>
                </div>
                <div id="ContentPlaceHolder1_Detail1_divSimple">

                    <table cellpadding="0" cellspacing="0" class="tblDetailDocument">
                        <tr>
                            <td class="tdLeft row1_bg">
                                Mã tài liệu:
                            </td>
                            <td class="tdLeft row1_bg">
                                ID:
                            </td>
                            <td class="tdLeft row1_bg">
                                Mượn sách online
                            </td>
                        </tr>
                        <?php foreach ($allBook as $book): ?>
                            <tr>
                                <td class="tdLeft row1_bg">
                                    <?php echo $book->bookBarcode.'-'.$book->serial; ?>
                                </td>
                                <td class="tdRight row1_bg">
                                    <span id="ContentPlaceHolder1_Detail1_lbDocumentFormat"><?php echo $book->bookID; ?></span>
                                </td >
                                <td class="tdRight row1_bg">
                                    <a href="<?php echo $this->url('search-book-category/process',array('action' => 'bookingOnline','id' => $book->bookBarcode.'-'.$book->bookID))?>">mượn sách này</a>
                                </td>
                            </tr>
                        <?php endforeach; ?>
                    </table>
                </div>
                <?php
                // add at the end of the file after the table
                echo $this->paginationControl(
                        // the paginator object
                        $this->paginator, 'sliding',
                        // the partial to use to render the control
                        array('partial/paginator_frontend.phtml', 'Application'),
                        // the route to link to when a user clicks a control link
                        array(
                    'route' => 'search-book-category/process'
                        )
                );
                ?>
            <?php else: ?> 
                <?php echo '<p style="color:red;margin-left:300px;">Không tìm thấy kết quả nào</p>' ?>
            <?php endif; ?>
        </div>
        <div class="boxRighBottom-3">
        </div>
    </div>
</div>
